import request from '@/utils/request'

//根据合并订单id查询商品订单信息
export function getOrderMeshId(query) {
  return request({
    url: '/shopping/mallOrder/getOrderMeshId',
    method: 'get',
    params: query
  })
}

export function queryOrderDetail(id){
  return request({
    url: `/shopping/mallOrder/queryOrderDetail/${id}`,
    method: 'get',
  })
}
export function queryAfterOrderDetail(id){
  return request({
    url: `/shopping/mallOrder/queryAfterOrderDetail/${id}`,
    method: 'get',
  })
}

//修改商城订单
export function editStatus(query) {
  return request({
    url: '/shopping/mallOrder/editStatus',
    method: 'get',
    params: query
  })
}
export function editOrder(query){
  return request({
    url: '/shopping/mallOrder/editOrder',
    method: 'get',
    params: query
  })
}

// 查询商城订单列表
export function listMallOrder(query) {
  return request({
    url: '/shopping/mallOrder/list',
    method: 'get',
    params: query
  })
}
export function listMallAfterSaleOrder(query) {
  return request({
    url: '/shopping/mallOrder/listMallAfterSaleOrder',
    method: 'get',
    params: query
  })
}

// 查询商城订单详细
export function getMallOrder(id) {
  return request({
    url: '/shopping/mallOrder/' + id,
    method: 'get'
  })
}

// 新增商城订单
export function addMallOrder(data) {
  return request({
    url: '/shopping/mallOrder',
    method: 'post',
    data: data
  })
}

// 修改商城订单
export function updateMallOrder(data) {
  return request({
    url: '/shopping/mallOrder',
    method: 'put',
    data: data
  })
}
// 修改平台备注
export function updateRemark(query) {
  return request({
    url: '/shopping/mallOrder/platformRemark',
    method: 'put',
    params: query
  })
}



// 删除商城订单
export function delMallOrder(id) {
  return request({
    url: '/shopping/mallOrder/' + id,
    method: 'delete'
  })
}
// 删除商城订单
export function logicDelMallOrder(id) {
  return request({
    url: '/shopping/mallOrder/' + id,
    method: 'delete'
  })
}

// 导出商城订单
export function exportMallOrder(query) {
  return request({
    url: '/shopping/mallOrder/export',
    method: 'get',
    params: query
  })
}
